#ifndef S2_H
#define S2_H

#include "i2c.h"

typedef struct
{
    i2c_addr_def bh1750_addr[2];
    i2c_addr_def icm20608_addr[2];
    i2c_addr_def sht35_addr[2];
} s2_addr_def;

#define BH1750_ADDRESS_S2              0x46       //0x46 0xB8
#define	SHT35_ADDRESS_S2		       0x88       //0x88 0x8A
#define ICM20608_ADDRESS_S2            0xD0       //0xD0 0xD2

#define BH1750_ADDRESS_S2              0x46

i2c_addr_def s2_init(uint8_t address);
void s2_all_init(s2_addr_def *s2_address,uint8_t bh1750_addr,uint8_t icm20608_addr,uint8_t sht35_addr);
void bh1750_init(uint32_t periph, uint8_t address);
void sht35_init(uint32_t periph, uint8_t address);
void icm20608_init(uint32_t periph, uint8_t address);
float s2_read_bh1750(uint32_t i2c_periph, uint8_t i2c_addr);
#endif


